Skip to content

RuntimeLibcalls: Remove target check for sjlj config #148792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Jul 15, 2025

I'm assuming this was the set of targets that were relevant
for sjlj handling. Just take the raw exception setting instead,
and assume it makes sense for the target.

@llvmbot
Copy link
Member

llvmbot commented Jul 15, 2025

@llvm/pr-subscribers-tablegen
@llvm/pr-subscribers-llvm-ir

@llvm/pr-subscribers-backend-arm

Author: Matt Arsenault (arsenm)

Changes

I'm assuming this was the set of targets that were relevant
for sjlj handling. Just take the raw exception setting instead,
and assume it makes sense for the target.


Full diff: https://github.com/llvm/llvm-project/pull/148792.diff

1 Files Affected:

  • (modified) llvm/lib/IR/RuntimeLibcalls.cpp (+2-4)
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index 12aa9dc8d3943..8a130ccfcb50c 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -72,10 +72,8 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
                                        EABI EABIVersion, StringRef ABIName) {
   setTargetRuntimeLibcallSets(TT, FloatABI);
 
-  if (TT.isX86() || TT.isVE() || TT.isARM() || TT.isThumb()) {
-    if (ExceptionModel == ExceptionHandling::SjLj)
-      setLibcallImpl(RTLIB::UNWIND_RESUME, RTLIB::_Unwind_SjLj_Resume);
-  }
+  if (ExceptionModel == ExceptionHandling::SjLj)
+    setLibcallImpl(RTLIB::UNWIND_RESUME, RTLIB::_Unwind_SjLj_Resume);
 
   if (TT.isARM() || TT.isThumb()) {
     setARMLibcallNames(*this, TT, FloatABI, EABIVersion);

@llvmbot
Copy link
Member

llvmbot commented Jul 15, 2025

@llvm/pr-subscribers-backend-x86

Author: Matt Arsenault (arsenm)

Changes

I'm assuming this was the set of targets that were relevant
for sjlj handling. Just take the raw exception setting instead,
and assume it makes sense for the target.


Full diff: https://github.com/llvm/llvm-project/pull/148792.diff

1 Files Affected:

  • (modified) llvm/lib/IR/RuntimeLibcalls.cpp (+2-4)
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index 12aa9dc8d3943..8a130ccfcb50c 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -72,10 +72,8 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
                                        EABI EABIVersion, StringRef ABIName) {
   setTargetRuntimeLibcallSets(TT, FloatABI);
 
-  if (TT.isX86() || TT.isVE() || TT.isARM() || TT.isThumb()) {
-    if (ExceptionModel == ExceptionHandling::SjLj)
-      setLibcallImpl(RTLIB::UNWIND_RESUME, RTLIB::_Unwind_SjLj_Resume);
-  }
+  if (ExceptionModel == ExceptionHandling::SjLj)
+    setLibcallImpl(RTLIB::UNWIND_RESUME, RTLIB::_Unwind_SjLj_Resume);
 
   if (TT.isARM() || TT.isThumb()) {
     setARMLibcallNames(*this, TT, FloatABI, EABIVersion);

@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/move-_stack_chk_fail-tablegen branch from 4717482 to 407ba2c Compare July 15, 2025 07:22
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/remove-target-check-exception-model-sjlj branch from 8e04afa to 3babdff Compare July 15, 2025 07:22
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/move-_stack_chk_fail-tablegen branch from 407ba2c to 7bf2a69 Compare July 28, 2025 02:43
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/remove-target-check-exception-model-sjlj branch from 3babdff to 48d32f8 Compare July 28, 2025 02:43
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/move-_stack_chk_fail-tablegen branch from 7bf2a69 to dfa00ac Compare July 28, 2025 03:05
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/remove-target-check-exception-model-sjlj branch from 48d32f8 to 204630d Compare July 28, 2025 03:05
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/move-_stack_chk_fail-tablegen branch from dfa00ac to 960cd88 Compare August 3, 2025 00:41
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/remove-target-check-exception-model-sjlj branch 2 times, most recently from 402b5c4 to df3b46c Compare August 3, 2025 16:32
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/move-_stack_chk_fail-tablegen branch 2 times, most recently from a6d0dbe to 919deef Compare August 3, 2025 23:54
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/remove-target-check-exception-model-sjlj branch from df3b46c to 1cb402d Compare August 3, 2025 23:54
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/move-_stack_chk_fail-tablegen branch from 919deef to fd401dd Compare August 4, 2025 02:10
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/remove-target-check-exception-model-sjlj branch from 1cb402d to 3b80be4 Compare August 4, 2025 02:11
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/move-_stack_chk_fail-tablegen branch 3 times, most recently from 5ff344f to 9346233 Compare August 4, 2025 03:20
Base automatically changed from users/arsenm/runtime-libcalls/move-_stack_chk_fail-tablegen to main August 4, 2025 04:02
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/remove-target-check-exception-model-sjlj branch from 3b80be4 to 4efd7ba Compare August 4, 2025 04:04
I'm assuming this was the set of targets that were relevant
for sjlj handling. Just take the raw exception setting instead,
and assume it makes sense for the target.
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/remove-target-check-exception-model-sjlj branch from 4efd7ba to 5f0561d Compare August 4, 2025 04:37
Copy link
Contributor Author

arsenm commented Aug 4, 2025

Merge activity

  • Aug 4, 4:37 AM UTC: Graphite rebased this pull request as part of a merge.
  • Aug 4, 5:15 AM UTC: @arsenm merged this pull request with Graphite.

@arsenm arsenm merged commit 144cd87 into main Aug 4, 2025
9 checks passed
@arsenm arsenm deleted the users/arsenm/runtime-libcalls/remove-target-check-exception-model-sjlj branch August 4, 2025 05:15
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 4, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-win running on sie-win-worker while building llvm at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/21158

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: COFF/import_weak_alias.test' FAILED ********************
Exit Code: 3221225477

Command Output (stdout):
--
# RUN: at line 3
split-file Z:\b\llvm-clang-x86_64-sie-win\llvm-project\lld\test\COFF\import_weak_alias.test Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir
# executed command: split-file 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\lld\test\COFF\import_weak_alias.test' 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir'
# note: command had no output on stdout or stderr
# RUN: at line 4
z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-mc.exe --filetype=obj -triple=x86_64-windows-msvc Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir/foo.s -o Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.foo.obj
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-mc.exe' --filetype=obj -triple=x86_64-windows-msvc 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir/foo.s' -o 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.foo.obj'
# note: command had no output on stdout or stderr
# RUN: at line 5
z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-mc.exe --filetype=obj -triple=x86_64-windows-msvc Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir/qux.s -o Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.qux.obj
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-mc.exe' --filetype=obj -triple=x86_64-windows-msvc 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir/qux.s' -o 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.qux.obj'
# note: command had no output on stdout or stderr
# RUN: at line 6
z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.qux.obj Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.foo.obj -out:Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dll -dll
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe' 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.qux.obj' 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.foo.obj' '-out:Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dll' -dll
# .---command stderr------------
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: z:\\b\\llvm-clang-x86_64-sie-win\\build\\bin\\lld-link.exe Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\lld\\test\\COFF\\Output\\import_weak_alias.test.tmp.qux.obj Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\lld\\test\\COFF\\Output\\import_weak_alias.test.tmp.foo.obj -out:Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\lld\\test\\COFF\\Output\\import_weak_alias.test.tmp.dll -dll
# | Exception Code: 0xC0000005
# | #0 0x00007ff8b39c1b39 (C:\Windows\System32\KERNELBASE.dll+0x41b39)
# | #1 0x00007ff76acfbb58 (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0xcbb58)
# | #2 0x00007ff76ad8331b (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0x15331b)
# | #3 0x00007ff76acdd9ea (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0xad9ea)
# | #4 0x00007ff76acdda54 (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0xada54)
# | #5 0x00007ff76d44e384 (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0x281e384)
# | #6 0x00007ff8b6ad7ac4 (C:\Windows\System32\KERNEL32.DLL+0x17ac4)
# | #7 0x00007ff8b6ffa8c1 (C:\Windows\SYSTEM32\ntdll.dll+0x5a8c1)
# `-----------------------------
# error: command failed with exit status: 0xc0000005

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 4, 2025

LLVM Buildbot has detected a new failure on builder lldb-aarch64-windows running on linaro-armv8-windows-msvc-05 while building llvm at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/141/builds/10575

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests.exe/2/12 (2274 of 2283)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests.exe/3/12 (2275 of 2283)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests.exe/4/12 (2276 of 2283)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests.exe/5/12 (2277 of 2283)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests.exe/6/12 (2278 of 2283)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests.exe/7/12 (2279 of 2283)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests.exe/8/12 (2280 of 2283)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests.exe/9/12 (2281 of 2283)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests.exe/0/1 (2282 of 2283)
TIMEOUT: lldb-unit :: Host/./HostTests.exe/6/12 (2283 of 2283)
******************** TEST 'lldb-unit :: Host/./HostTests.exe/6/12' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\unittests\Host\.\HostTests.exe-lldb-unit-9480-6-12.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=12 GTEST_SHARD_INDEX=6 C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\tools\lldb\unittests\Host\.\HostTests.exe
--

Note: This is test shard 7 of 12.

[==========] Running 8 tests from 6 test suites.

[----------] Global test environment set-up.

[----------] 1 test from FileSystemTest

[ RUN      ] FileSystemTest.FileAndDirectoryComponents

[       OK ] FileSystemTest.FileAndDirectoryComponents (0 ms)

[----------] 1 test from FileSystemTest (0 ms total)



[----------] 1 test from HostInfoTest

[ RUN      ] HostInfoTest.GetAugmentedArchSpec

[       OK ] HostInfoTest.GetAugmentedArchSpec (1 ms)

[----------] 1 test from HostInfoTest (1 ms total)



[----------] 2 tests from MainLoopTest

[ RUN      ] MainLoopTest.ReadPipeObject


--
exit: 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants